/****** Object:  Stored Procedure dbo.spr_InsertDBCarAssign  ******/

 use [TourIS]
 GO

 if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spr_InsertDBCarAssign]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
 drop procedure [dbo].[spr_InsertDBCarAssign]
 GO

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS OFF
 GO

 CREATE  PROCEDURE [dbo].[spr_InsertDBCarAssign]
 (
	@carid int,
	@compid int,
	@driverid int,
	@fineamount int,
	@finetype varchar(50),
	@forclientid int,
	@forempid int,
	@srno int,
	@takenfrom smalldatetime,
	@takentill smalldatetime
 )
 AS

 BEGIN
	SET NOCOUNT ON
	DECLARE @Err int

	INSERT INTO [CarAssign]
	(
		[CarId],
		[CompId],
		[DriverId],
		[FineAmount],
		[FineType],
		[ForClientId],
		[ForEmpId],
		[SrNo],
		[TakenFrom],
		[TakenTill]
	)
	VALUES
	(
		@carid,
		@compid,
		@driverid,
		@fineamount,
		@finetype,
		@forclientid,
		@forempid,
		@srno,
		@takenfrom,
		@takentill
	)

	SET @Err = @@Error
	RETURN @Err
 END

 GO

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS ON
 GO

